package com.dyzs.activity.word;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

import com.dyzs.activity.R;

public class WordMainActivity extends TabActivity {
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		TabHost tabHost = getTabHost();
		LayoutInflater.from(this).inflate(R.layout.word_main,tabHost.getTabContentView(), true);
		
			
	
		
		
		TabSpec ts1 = tabHost.newTabSpec("tab1");
		ts1.setIndicator("西北");
		Intent it1 = new Intent(this, ProviceListActivity.class);
		it1.putExtra("proviceList",new String[]{"陕西","新疆","甘肃","青海","宁夏"});
		it1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		ts1.setContent(it1);
		tabHost.addTab(ts1);
		
		
		
	
		TabSpec ts2 = tabHost.newTabSpec("tab2");
		ts2.setIndicator("西南");
		Intent it2 = new Intent(this, ProviceListActivity.class);
		it2.putExtra("proviceList",new String[]{"西藏","贵州","云南","重庆","四川"});
		it2.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		ts2.setContent(it2);
		tabHost.addTab(ts2);
		

		
		
		TabSpec ts3 = tabHost.newTabSpec("tab3");
		ts3.setIndicator("华南");
		Intent it3 = new Intent(this, ProviceListActivity.class);
		it3.putExtra("proviceList",new String[]{"河南","湖南","广西","广东","湖北","海南"});
		it3.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		ts3.setContent(it3);
		tabHost.addTab(ts3);
		
		
	
		
		TabSpec ts4 = tabHost.newTabSpec("tab4");
		ts4.setIndicator("华北");
		Intent it4 = new Intent(this, ProviceListActivity.class);
		it4.putExtra("proviceList",new String[]{"天津","河北","山西","内蒙古","北京"});
		it4.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		ts4.setContent(it4);
		tabHost.addTab(ts4);
		
		


		
		TabSpec ts5 = tabHost.newTabSpec("tab5");
		ts5.setIndicator("东北");
		Intent it5 = new Intent(this, ProviceListActivity.class);
		it5.putExtra("proviceList",new String[]{"辽宁","吉林","黑龙江"});
		it5.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		ts5.setContent(it5);
		tabHost.addTab(ts5);
		
		
		TabSpec ts6 = tabHost.newTabSpec("tab6");
		ts6.setIndicator("华东");
		Intent it6 = new Intent(this, ProviceListActivity.class);
		it6.putExtra("proviceList",new String[]{"福建","江西","山东","上海","江苏","浙江","安徽"});
		it6.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		ts6.setContent(it6);
		tabHost.addTab(ts6);		
		
		tabHost.setCurrentTab(0);		
	}

	
	
	public void onClick(View v){
		Intent it = new Intent(this, WordCollectionActivity.class);
		it.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		this.startActivity(it);
	}
	


}
